This endpoint provides domains based on the HTML terms they use on their homepage. In addition to the list of domains, you will also get their technology profiles, the country and language they belong to, and other related data.
Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-dashboard
# Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-dashboard
login="login"
password="password"
cred="$(printf ${login}:${password} | base64)"
curl --location --request POST "https://api.dataforseo.com/v3/domain_analytics/technologies/domains_by_html_terms/live"
--header "Authorization: Basic ${cred}"
--header "Content-Type: application/json"
--data-raw "[
{
"search_terms": [
"data-attrid"
],
"order_by": [
"last_visited,desc"
],
"limit": 10,
"offset": 0
}
]"
<?php
// You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip
require('RestClient.php');
$api_url = 'https://api.dataforseo.com/';
// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-dashboard
$client = new RestClient($api_url, null, 'login', 'password');
$post_array = array();
// You can set only one task at a time
$post_array[] = array(
"search_terms" => [
"data-attrid"
],
"order_by" => ["last_visited,desc"],
"limit" => 10,
"offset" => 0
);
try {
// POST /v3/domain_analytics/technologies/domains_by_html_terms/live
$result = $client->post('/v3/domain_analytics/technologies/domains_by_html_terms/live', $post_array);
print_r($result);
// do something with post result
} catch (RestClientException $e) {
echo "n";
print "HTTP code: {$e->getHttpCode()}n";
print "Error code: {$e->getCode()}n";
print "Message: {$e->getMessage()}n";
print $e->getTraceAsString();
echo "n";
}
$client = null;
?>
from client import RestClient
# You can download this file from here https://cdn.dataforseo.com/v3/examples/python/python_Client.zip
client = RestClient("login", "password")
post_data = dict()
# You can set only one task at a time
post_data[len(post_data)] = dict(
search_terms = [
"data-attrid"
],
order_by = ["last_visited,desc"],
limit = 10,
offset = 10
)
# POST /v3/domain_analytics/technologies/domains_by_html_terms/live
response = client.post("/v3/domain_analytics/technologies/domains_by_html_terms/live", post_data)
# you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
if response["status_code"] == 20000:
print(response)
# do something with result
else:
print("error. Code: %d Message: %s" % (response["status_code"], response["status_message"]))
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace DataForSeoDemos
{
public static partial class Demos
{
public static async Task domain_analytics_technologies_domains_by_html_terms_live()
{
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.dataforseo.com/"),
// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-dashboard
DefaultRequestHeaders = { Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes("login:password"))) }
};
var postData = new List<object>();
// You can set only one task at a time
postData.Add(new
{
search_terms = new[]{ "data-attrid" },
order_by = new object[] { "last_visited,desc" },
limit = 10,
offset = 0
});
// POST /v3/domain_analytics/technologies/domains_by_html_terms/live
var taskPostResponse = await httpClient.PostAsync("/v3/domain_analytics/technologies/domains_by_html_terms/live", new StringContent(JsonConvert.SerializeObject(postData)));
var result = JsonConvert.DeserializeObject<dynamic>(await taskPostResponse.Content.ReadAsStringAsync());
// you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
if (result.status_code == 20000)
{
// do something with result
Console.WriteLine(result);
}
else
Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
}
}
}
The above command returns JSON structured like this:
All POST data should be sent in the JSON format (UTF-8 encoding). The task setting is done using the POST method. When setting a task, you should send all task parameters in the task array of the generic POST array. You can send up to 2000 API requests per minute.
You can specify the number of results you want to retrieve, filter and sort them.
Description of the fields for setting a task:
Field name
Type
Description
search_terms
array
target search terms required field
specify target HTML elements, tags, attributes, their content or all of the above
if you specify more than one search term, you will receive only the domains containing all of the specified terms in the HTML code of their homepage
maximum number of search terms you can specify: 10
example: ["data-attrid"]
keywords
array
target keywords in the domain’s title, description or meta keywords
optional field
UTF-8 encoding
maximum number of keywords you can specify: 10
example: ["seo","software"]
learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article
mode
string
search mode
optional field
possible search mode types: strict_entry – search for results exactly matching the order, intervals and separators in the specified search terms entry – search for results ignoring the order, intervals and separators in the specified search terms
default value: entry
filters
array
array of results filtering parameters
optional field you can add several filters at once (8 filters maximum)
you should set a logical operator and, or between the conditions
the following operators are supported: <, <=, >, >=, =, <>, in, not_in, like, not_like
you can use the % operator with like and not_like to match any string of zero or more characters
example: ["domain","like","%seo%"]
results sorting rules
optional field
available fields: domain_rank, domain, last_visited, country_iso_code, language_code, content_language_code
possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order
you should use a comma to set up a sorting type
example: ["last_visited,desc"]
default rule: ["domain_rank,desc"] note that you can set no more than three sorting rules in a single request
you should use a comma to separate several sorting rules
example: ["last_visited,desc","domain_rank,desc"]
limit
integer
the maximum number of returned domains
optional field
default value: 100
maximum value: 10000
offset
integer
offset in the results array of returned domains
optional field
default value: 0
if you specify the 10 value, the first ten domains in the results array will be omitted and the data will be provided for the successive domains; Note: the maximum value is 9999, the sum of limit and offset must not exceed 10000;
use the offset_token if you would like to offset more results
offset_token
string
token for subsequent requests
optional field
provided in the identical filed of the response to each request;
use this parameter to avoid timeouts while trying to obtain over 100,000 results in a single request;
by specifying the unique offset_token value from the response array, you will get the subsequent results of the initial task; offset_token values are unique for each subsequent task Note: if the offset_token is specified in the request, all other parameters should be identical to the previous request
As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.
Description of the fields in the results array:
Field name
Type
Description
version
string
the current version of the API
status_code
integer
general status code
you can find the full list of the response codes here Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions
status_message
string
general informational message
you can find the full list of general informational messages here
time
string
execution time, seconds
cost
float
total tasks cost, USD
tasks_count
integer
the number of tasks in the tasks array
tasks_error
integer
the number of tasks in the tasks array returned with an error
tasks
array
array of tasks
id
string
task identifier unique task identifier in our system in the UUID format
status_code
integer
status code of the task
generated by DataForSEO; can be within the following range: 10000-60000
you can find the full list of the response codes here
status_message
string
informational message of the task
you can find the full list of general informational messages here
time
string
execution time, seconds
cost
float
cost of the task, USD
result_count
integer
number of elements in the result array
path
array
URL path
data
object
contains the same parameters that you specified in the POST request
result
array
array of results
total_count
integer
total number of relevant items in the database
items_count
integer
number of items in the results array
offset
integer
specified offset value
offset_token
string
token for subsequent requests
by specifying the unique offset_token when setting a new task, you will get the subsequent results of the initial task; offset_token values are unique for each subsequent task
items
array
items array
type
string
type of the item = ‘domain_technology_item’
domain
string
specified domain name
title
string
domain meta title
description
string
domain meta description
meta_keywords
array
domain meta keywords
domain_rank
string
backlink rank of the target domain
learn more about the metric and how it is calculated in this help center article
last_visited
string
most recent date when our crawler visited the domain
in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
example: 2022-10-10 12:57:46 +00:00
country_iso_code
string
domain ISO code
ISO code of the country that target domain is determined to belong to
language_code
string
domain language
code of the language that target domain is determined to be associated with
content_language_code
string
content language
code of the language that content on the target domain is written with
phone_numbers
array
phone numbers of the target
contact phone numbers indicated on the target website
emails
array
emails of the target
emails indicated on the target website
social_graph_urls
array
social media links and handles
social media URLs detected in the social graphs of the target website
technologies
object
technologies used by target domain
contains objects with the names of technologies used on the website;
to get a full list of technologies and their structure, refer to the technologies endpoint